Function reference previous pagenext page

1.4: uix.TabPanel Go back up one level


Arrange elements in a panel with tabs for selecting which is visible

obj = uix.TabPanel( )
creates a panel with tabs along one edge to allow selection between the different child objects contained.
obj = uix.TabPanel( prop, value, ... )
also sets one or more property values.

uix.TabPanel properties

PropertyValueDescription
BackgroundColor colorspecColor to use for exposed areas of the layout background. This can be an RGB triple (e.g. [0 0 1]) or a colour name (e.g. 'b').
BeingDeleted on | offDeletion status.
Contents empty GraphicsPlaceholder array | array of graphics objectsChildren within this layout, regardless of HandleVisibility. Note that this can only be set to permutations of itself.
DeleteFcn function_handleFunction to call when the layout is being deleted.
FontAngle normal | italic | obliqueTitle font angle.
FontName stringTitle font name (e.g. Arial, Helvetica etc).
FontSize positive integerTitle font size.
FontUnits inches | centimeters | normalized | points | pixelsTitle font units for measuring size.
FontWeight light | normal | demi | boldTitle font weight.
ForegroundColor colorspecTitle font color and/or color of 2-D border line.
HighlightColor colorspec3-D frame highlight color.
ShadowColor colorspec3-D frame shadow color.
IsMinimized logicalIs this panel in a minimized state.
MinimizeFcn function handleFunction to call when panel is minimized or maximized.
Padding positive integerNumber of pixels of extra space around the outside of the layout.
Parent empty GraphicsPlaceholder array | figure | containerParent of the layout.
Position [x y w h]Position (x,y) and size (w,h) within figure or container.
Selection positive integer or emptyWhich child is visible.
SelectionChangedFcn function_handleFunction to call when the selected tab is changed. The event-data supplied has fields OldValue and NewValue giving the previously selected and newly selected tab indices.
TabContextMenus cell array of context menusThe context menu (or []) for each tab.
TabEnables cell array of on | offA list of the enabled state of each tab (default is all 'on').
TabTitles cell array of stringsA list of the names of the tabs with one entry per tab.
TabWidth positive integerWidth of each tab in pixels (default 50).
Tag stringTag to associate with layout.
Type stringType of graphics object.
Units inches | centimeters | normalized | points | pixels | charactersPosition units.
Visible on | offVisibility.

For example:

f = figure();
p = uix.TabPanel( 'Parent', f, 'Padding', 5 );
uicontrol( 'Parent', p, 'Background', 'r' );
uicontrol( 'Parent', p, 'Background', 'b' );
uicontrol( 'Parent', p, 'Background', 'g' );
p.TabTitles = {'Red', 'Blue', 'Green'};
p.Selection = 2;


See also:
© 2016 The MathWorks Ltd Terms of Use Patents Trademarks